for(let ele in PostType) {
    document.getElementById("type_select").innerHTML += `<option value="`+ele+`">`+PostType[ele]+`</option>`
}
document.getElementById("type_select").value = type
$.get("/post/api/get/list",{
    type:type
},function(data) {
    table.innerHTML = ''
    for (i=0; i<data.length; i++) {
        d = data[i]
        control = `
        <a href="/post/edit/ID" class="a">编辑</a>
        `
        table.innerHTML += sub
                            .replaceAll("CONTROL",control)
                            .replaceAll("ID",d.pid)
                            .replaceAll("TITLE",d.title)
                            .replaceAll("TYPE",PostType[d.type])
    }
})
